Skip to content

Conversation

@mdegat01
Copy link
Contributor

@mdegat01 mdegat01 commented Jul 24, 2025

Proposed change

Only the last 4 versions of OS are supported. Add an evaluation that marks system as unsupported if running a version of OS older then that.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to the supervisor)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Ruff (ruff format supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints or add-on configuration are added/changed:

@mdegat01 mdegat01 requested review from agners and sairon July 24, 2025 19:32
@mdegat01 mdegat01 added missing-documentation Added to pull requests that needs a docs, but none is linked new-feature A new feature needs-client-library Pull requests needs client library changes but none is linked labels Jul 24, 2025
@mdegat01 mdegat01 removed the needs-client-library Pull requests needs client library changes but none is linked label Jul 24, 2025
Copy link
Member

@agners agners left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will raise a repair with the title "Unsupported system - os_version" and text "System is unsupported due to os_version. Use the link to learn more and how to fix this.". I guess the full string should be "Home Assistant OS version" 🤔

Ideally we get translation strings in for this release (similar to home-assistant/frontend#26190).

So this will mark everything older than 12.0 as unsupported (all HAOS installations with major version < (16 - 4)). From analytics, this are about 3.5% of users, around 11k according to opt-in statistics. This is well within ADR0015 supported version definition, so from that perspective we should be fine. But we should have documentation up on why we do this before promoting a Supervisor version with this code to stable.

Copy link
Member

@sairon sairon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stefan said it all, I agree with the deprecation proposal as well.

@mdegat01 mdegat01 force-pushed the add-evaluate-os-version branch from 86f70cc to 81137ad Compare August 1, 2025 20:51
@mdegat01
Copy link
Contributor Author

mdegat01 commented Aug 1, 2025

This will raise a repair with the title "Unsupported system - os_version" and text "System is unsupported due to os_version. Use the link to learn more and how to fix this.". I guess the full string should be "Home Assistant OS version"

Good point. I'll put up a PR for that. I wonder if that should be a checklist item in the PR template? I guess its not that common but changes in resolution require it a lot 🤔

But @agners your link confuses me. I didn't realize that was in the frontend codebase. Up until now I had been putting translation strings for these here:
https://github.com/home-assistant/core/blob/bddd4d621a98f5ba1f0c0e46b01d148e645b504c/homeassistant/components/hassio/strings.json#L118-L229

Do these not work? Or is there some reason we have to put this information in frontend as well? I'd prefer them to all be in the hassio component if possible to keep them in one place with the supervisor code in core...

Copy link
Member

@agners agners left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@agners
Copy link
Member

agners commented Aug 5, 2025

But @agners your link confuses me. I didn't realize that was in the frontend codebase. Up until now I had been putting translation strings for these here: https://github.com/home-assistant/core/blob/bddd4d621a98f5ba1f0c0e46b01d148e645b504c/homeassistant/components/hassio/strings.json#L118-L229

Do these not work? Or is there some reason we have to put this information in frontend as well? I'd prefer them to all be in the hassio component if possible to keep them in one place with the supervisor code in core...

Hm, I see, it appears we have translations on both sides currently.

It seems that for the repairs itself the hassio integration translations are used.

But there is one place where we still use the frontend translations, namely in the System info page, where we show a list of unsupported/unhealthy reasons:

image

@agners agners merged commit 8a1e6b0 into main Aug 5, 2025
23 checks passed
@agners agners deleted the add-evaluate-os-version branch August 5, 2025 11:23
if (
not self.sys_os.available
or not (current := self.sys_os.version)
or not (latest := self.sys_os.latest_version)
Copy link
Member

@agners agners Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've downgraded to OS 11.5 (which should be the last unsupported version) but it turns out this evaluation is actually not working correctly: this property has the latest version which we are allowed to upgrade, according to the OS upgrade path.

upgrade_map = data.get("hassos-upgrade", {})
if last_in_major := upgrade_map.get(str(self.sys_os.version.major)):
if self.sys_os.version != AwesomeVersion(last_in_major):
version = last_in_major
elif last_in_next_major := upgrade_map.get(
str(int(self.sys_os.version.major) + 1)
):
version = last_in_next_major
self._data[ATTR_HASSOS] = AwesomeVersion(version)

For all recent major OS versions we mandate to upgrade to OS 15.2, so that property is 15.2. But 15 - 4 = 11, so the evaluation returns False. This pretty much makes all OS versions "supported" currently 🙈

I guess we have to store both, the absolutely latest version and the next version we are allowed to upgrade.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoot. Right, the upgrade path 🙈

@github-actions github-actions bot locked and limited conversation to collaborators Aug 7, 2025
@mdegat01 mdegat01 removed the missing-documentation Added to pull requests that needs a docs, but none is linked label Sep 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants